#ifndef FGE_ANIMATION_HPP
#define FGE_ANIMATION_HPP

#include <string>

#include "SpriteBatch.hpp"
#include "Math.hpp"

namespace fge
{

struct AnimationEvent
{
	bool AnimationComplete;
	std::string AnimationTrigger;
};

class AnimationPlayer
{
public:
	virtual ~AnimationPlayer() { }
	virtual void StartAnimation(const std::string &name, bool allowRestart = false) = 0;
	virtual AnimationEvent Update(float deltaSeconds) = 0;
	virtual AnimationEvent SetTime(float seconds) = 0;
	virtual void Draw(SpriteBatch *spriteBatch,
		const Vector2 &position,
		float rotation = 0,
		const Vector2 &scale = Vector2::ONE,
		const Color &tintColor = Color::White,
		bool flipHorizontal = false,
		bool flipVertical = false) = 0;

	std::string GetCurrentAnimationName() const { return currentAnimationName; }

protected:
	std::string currentAnimationName;
};


}

#endif//FGE_ANIMATION_HPP